﻿CREATE PROCEDURE [acms].[UserSecurity_Delete]
	@Id int, 
	@VersionId Timestamp
AS
	Delete [Users]
	Where Id = @Id and VersionId = @VersionId
	if @@Rowcount = 1
		RETURN 0;
	else begin
		if exists (Select null from [Users] where Id = @Id)
			return -100
		else
			return -200
	end